package com.pmsystem.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class WaterConsumeExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public WaterConsumeExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andWaterConsumeIdIsNull() {
            addCriterion("water_consume_id is null");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdIsNotNull() {
            addCriterion("water_consume_id is not null");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdEqualTo(Integer value) {
            addCriterion("water_consume_id =", value, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdNotEqualTo(Integer value) {
            addCriterion("water_consume_id <>", value, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdGreaterThan(Integer value) {
            addCriterion("water_consume_id >", value, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("water_consume_id >=", value, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdLessThan(Integer value) {
            addCriterion("water_consume_id <", value, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdLessThanOrEqualTo(Integer value) {
            addCriterion("water_consume_id <=", value, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdIn(List<Integer> values) {
            addCriterion("water_consume_id in", values, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdNotIn(List<Integer> values) {
            addCriterion("water_consume_id not in", values, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdBetween(Integer value1, Integer value2) {
            addCriterion("water_consume_id between", value1, value2, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIdNotBetween(Integer value1, Integer value2) {
            addCriterion("water_consume_id not between", value1, value2, "waterConsumeId");
            return (Criteria) this;
        }

        public Criteria andRoomIdIsNull() {
            addCriterion("room_id is null");
            return (Criteria) this;
        }

        public Criteria andRoomIdIsNotNull() {
            addCriterion("room_id is not null");
            return (Criteria) this;
        }

        public Criteria andRoomIdEqualTo(Integer value) {
            addCriterion("room_id =", value, "roomId");
            return (Criteria) this;
        }

        public Criteria andRoomIdNotEqualTo(Integer value) {
            addCriterion("room_id <>", value, "roomId");
            return (Criteria) this;
        }

        public Criteria andRoomIdGreaterThan(Integer value) {
            addCriterion("room_id >", value, "roomId");
            return (Criteria) this;
        }

        public Criteria andRoomIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("room_id >=", value, "roomId");
            return (Criteria) this;
        }

        public Criteria andRoomIdLessThan(Integer value) {
            addCriterion("room_id <", value, "roomId");
            return (Criteria) this;
        }

        public Criteria andRoomIdLessThanOrEqualTo(Integer value) {
            addCriterion("room_id <=", value, "roomId");
            return (Criteria) this;
        }

        public Criteria andRoomIdIn(List<Integer> values) {
            addCriterion("room_id in", values, "roomId");
            return (Criteria) this;
        }

        public Criteria andRoomIdNotIn(List<Integer> values) {
            addCriterion("room_id not in", values, "roomId");
            return (Criteria) this;
        }

        public Criteria andRoomIdBetween(Integer value1, Integer value2) {
            addCriterion("room_id between", value1, value2, "roomId");
            return (Criteria) this;
        }

        public Criteria andRoomIdNotBetween(Integer value1, Integer value2) {
            addCriterion("room_id not between", value1, value2, "roomId");
            return (Criteria) this;
        }

        public Criteria andMonthsIsNull() {
            addCriterion("months is null");
            return (Criteria) this;
        }

        public Criteria andMonthsIsNotNull() {
            addCriterion("months is not null");
            return (Criteria) this;
        }

        public Criteria andMonthsEqualTo(Date value) {
            addCriterionForJDBCDate("months =", value, "months");
            return (Criteria) this;
        }

        public Criteria andMonthsNotEqualTo(Date value) {
            addCriterionForJDBCDate("months <>", value, "months");
            return (Criteria) this;
        }

        public Criteria andMonthsGreaterThan(Date value) {
            addCriterionForJDBCDate("months >", value, "months");
            return (Criteria) this;
        }

        public Criteria andMonthsGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("months >=", value, "months");
            return (Criteria) this;
        }

        public Criteria andMonthsLessThan(Date value) {
            addCriterionForJDBCDate("months <", value, "months");
            return (Criteria) this;
        }

        public Criteria andMonthsLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("months <=", value, "months");
            return (Criteria) this;
        }

        public Criteria andMonthsIn(List<Date> values) {
            addCriterionForJDBCDate("months in", values, "months");
            return (Criteria) this;
        }

        public Criteria andMonthsNotIn(List<Date> values) {
            addCriterionForJDBCDate("months not in", values, "months");
            return (Criteria) this;
        }

        public Criteria andMonthsBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("months between", value1, value2, "months");
            return (Criteria) this;
        }

        public Criteria andMonthsNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("months not between", value1, value2, "months");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIsNull() {
            addCriterion("water_consume is null");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIsNotNull() {
            addCriterion("water_consume is not null");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeEqualTo(Float value) {
            addCriterion("water_consume =", value, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeNotEqualTo(Float value) {
            addCriterion("water_consume <>", value, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeGreaterThan(Float value) {
            addCriterion("water_consume >", value, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeGreaterThanOrEqualTo(Float value) {
            addCriterion("water_consume >=", value, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeLessThan(Float value) {
            addCriterion("water_consume <", value, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeLessThanOrEqualTo(Float value) {
            addCriterion("water_consume <=", value, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeIn(List<Float> values) {
            addCriterion("water_consume in", values, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeNotIn(List<Float> values) {
            addCriterion("water_consume not in", values, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeBetween(Float value1, Float value2) {
            addCriterion("water_consume between", value1, value2, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andWaterConsumeNotBetween(Float value1, Float value2) {
            addCriterion("water_consume not between", value1, value2, "waterConsume");
            return (Criteria) this;
        }

        public Criteria andEnableIsNull() {
            addCriterion("enable is null");
            return (Criteria) this;
        }

        public Criteria andEnableIsNotNull() {
            addCriterion("enable is not null");
            return (Criteria) this;
        }

        public Criteria andEnableEqualTo(Byte value) {
            addCriterion("enable =", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableNotEqualTo(Byte value) {
            addCriterion("enable <>", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableGreaterThan(Byte value) {
            addCriterion("enable >", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableGreaterThanOrEqualTo(Byte value) {
            addCriterion("enable >=", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableLessThan(Byte value) {
            addCriterion("enable <", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableLessThanOrEqualTo(Byte value) {
            addCriterion("enable <=", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableIn(List<Byte> values) {
            addCriterion("enable in", values, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableNotIn(List<Byte> values) {
            addCriterion("enable not in", values, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableBetween(Byte value1, Byte value2) {
            addCriterion("enable between", value1, value2, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableNotBetween(Byte value1, Byte value2) {
            addCriterion("enable not between", value1, value2, "enable");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}